package com.tct.smartRE.fwk.domain;

import java.util.Date;

import com.tct.smartRE.fwk.api.IBusinessObject;

public class BusinessObject implements IBusinessObject {

	private Integer id = null;
	private Date updatedDate;
	private Date createdDate;
	private String updatedUser;
	private String createdUser;
	private boolean inactive = false;

	public BusinessObject() {
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param createdDate
	 *            the createdDate to set
	 */
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	/**
	 * @return the createdDate
	 */
	public Date getCreatedDate() {
		return createdDate;
	}

	/**
	 * @param updatedUser
	 *            the updatedUser to set
	 */
	public void setUpdatedUser(String updatedUser) {
		this.updatedUser = updatedUser;
	}

	/**
	 * @return the updatedUser
	 */
	public String getUpdatedUser() {
		return updatedUser;
	}

	/**
	 * @param createdUser
	 *            the createdUser to set
	 */
	public void setCreatedUser(String createdUser) {
		this.createdUser = createdUser;
	}

	/**
	 * @return the createdUser
	 */
	public String getCreatedUser() {
		return createdUser;
	}

	/**
	 * @param inactive
	 *            the inactive to set
	 */
	public void setInactive(boolean inactive) {
		this.inactive = inactive;
	}

	/**
	 * @return the inactive
	 */
	public boolean getInactive() {
		return inactive;
	}

	/**
	 * @return the inactive
	 */
	public boolean isInactive() {
		return inactive;
	}

	@Override
	public boolean equals(Object obj) {
		return obj instanceof BusinessObject && id != null
				&& id.equals(((BusinessObject) obj).id);
	}

	@Override
	public int hashCode() {
		return id != null ? this.getClass().hashCode() + id.hashCode() : super
				.hashCode();
	}

	public Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Date date) {
		updatedDate = date;
	}
}
